package cn.edu.cqytxy.entity;

import com.alibaba.fastjson.JSONObject;

/**
 * @author yinjw
 */
public class Test {

    public static void main(String[] args) {
        Stu stu = new Stu();
        stu.setName("yinjw");
        stu.setAge(18);

        Object o = JSONObject.toJSON(stu);
        JSONObject jsonObject = (JSONObject) o;

        System.out.println(jsonObject.toJSONString());
    }
}
